/**
 * @Description
 */

class MyValue{
    int val;
}


public class Test {

    public static void swap(MyValue myValue1,MyValue myValue2){
        int tmp = 0;
        tmp = myValue1.val;
        myValue1.val = myValue2.val;
        myValue2.val = tmp;
    }

    public static void main(String[] args) {
        MyValue myValue1 = new MyValue();
        myValue1.val = 10;
        MyValue myValue2 = new MyValue();
        myValue2.val = 20;
        swap(myValue1,myValue2);
        System.out.println(myValue1.val+" "+myValue2.val);

    }

}
